import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Icon, Card } from 'antd'
import './NumberCard.css'

class NumberCard extends Component {
  render() {
    return (
        <Card className="numberCard" bordered={false} bodyStyle={{ padding: 0 }}>
          <Icon className="iconWarp" type={this.props.icon} style={this.props.color}/>
          <div className="content">
            <p className="title">{this.props.title}</p>
            <p className="number">{this.props.number}</p>
          </div>
        </Card>
    )
  }
}

NumberCard.propTypes = {
  icon: PropTypes.string,
  color: PropTypes.object,
  title: PropTypes.string,
  number: PropTypes.number,
  countUp: PropTypes.object,
}

export default NumberCard